package com.atguigu.modStudy;

import com.atguigu.modStudy.entity.ObsidianIngot;
import com.atguigu.modStudy.entity.ObsidianApple;
import com.atguigu.modStudy.entity.ObsidianSword;
import com.atguigu.modStudy.entity.ObsidianPickaxe;
import com.atguigu.modStudy.entity.MagicIngot;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;

public class ItemRegistry {
    //实例化物品，最后加入到物品注册表中
    public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, Utils.MOD_ID);
    //注册黑曜石锭
    public static final RegistryObject<Item> obsidianIngot = ITEMS.register("obsidian_ingot", ObsidianIngot::new);
    //注册黑曜石苹果
    public static final RegistryObject<Item> obsidianApple = ITEMS.register("obsidian_apple", ObsidianApple::new);
    //注册黑曜石剑
    public static final RegistryObject<Item> obsidianSword = ITEMS.register("obsidian_sword", ObsidianSword::new);
    //注册黑曜石镐
    public static final RegistryObject<Item> obsidianPickaxe = ITEMS.register("obsidian_pickaxe", ObsidianPickaxe::new);
    //注册黑曜石头盔
    public static final RegistryObject<Item> obsidianHelmet = ITEMS.register("obsidian_helmet",
            () -> new ArmorItem(ModArmorMaterial.OBSIDIAN, EquipmentSlotType.HEAD, new Item.Properties().group(ModGroup.itemGroup)));
    //注册黑曜石头胸甲
    public static final RegistryObject<Item> obsidianChestplate = ITEMS.register("obsidian_chestplate",
            () -> new ArmorItem(ModArmorMaterial.OBSIDIAN, EquipmentSlotType.CHEST, new Item.Properties().group(ModGroup.itemGroup)));
    //注册黑曜石头护腿
    public static final RegistryObject<Item> obsidianLeggings = ITEMS.register("obsidian_leggings",
            () -> new ArmorItem(ModArmorMaterial.OBSIDIAN, EquipmentSlotType.LEGS, new Item.Properties().group(ModGroup.itemGroup)));
    //注册黑曜石头靴子
    public static final RegistryObject<Item> obsidianBoots = ITEMS.register("obsidian_boots",
            () -> new ArmorItem(ModArmorMaterial.OBSIDIAN, EquipmentSlotType.FEET, new Item.Properties().group(ModGroup.itemGroup)));
    //注册魔法锭
    public static final RegistryObject<Item> magicIngot = ITEMS.register("magic_ingot", MagicIngot::new);
    //注册黑曜石方块
    public static final RegistryObject<Item> obsidianBlock = ITEMS.register("obsidian_block", () -> new BlockItem(BlockRegistry.obsidianBlock.get(), new Item.Properties().group(ModGroup.itemGroup)));


}

